package org.jeecg.modules.zhima.portal.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.zhima.admin.entity.ZmGame;
import org.jeecg.modules.zhima.admin.entity.ZmGamePlayer;
import org.jeecg.modules.zhima.portal.domain.Game;
import org.jeecg.modules.zhima.portal.domain.OrderPrepayReturn;

import java.util.List;

public interface IGameService {

    IPage<Game> page(Page<ZmGame> page, QueryWrapper<ZmGame> queryWrapper);

    /**
     * 首页赛事列表
     * @param
     * @return
     */
    List<Game> home();

    Game publish(Game game);

    Game getById(String id);

    OrderPrepayReturn join(Game game);

    Boolean unJoin(String gameId);

    List<Game> listMyJoin(List<String> gameIds, int status);

    List<Game> listPublish(String userId, int status);

    List<Game> listMyJoin(Game game);

    List<Game> myPublish(Game game);


    /**
     * 赛事结算
     * @param game
     * @return
     */
    boolean finish(Game game);
    /**
     * 取消赛事
     * @param game
     * @return
     */
    boolean cancel(Game game);
    /**
     * 赛事编辑
     * @param zmGame
     * @return
     */
    boolean edit(ZmGame zmGame);
    /**
     * 赛事延期
     * @param zmGame
     * @return
     */
    boolean delay(ZmGame zmGame);

    /**
     * 获取待计分的赛事
     */
    List<Game> calculate();

}
